From: Robert Lipe Date: Sat, 7 May 2016 02:38:29 +0000 (-0500) Subject: Enforce Qt 5.2.0 as our new minimum floor during build. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~9^2~21 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=4b29fdc95625fb4957d2a5748d2c70792a27e161;p=gpsbabel.git Enforce Qt 5.2.0 as our new minimum floor during build. Remove runtime checks for < that. --- diff --git a/gui/main.cc b/gui/main.cc index 62393fbef..e9f991f92 100644 --- a/gui/main.cc +++ b/gui/main.cc @@ -44,13 +44,8 @@ const char *pathSeparator = ":"; //------------------------------------------------------------------------ int main(int argc, char**argv) { -#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) - // Qt 5.0 uses QString::fromUtf8 to convert from character pointers - // and QBytreArrays to QStrings while previous version of Qt used - // QString::fromAscii. QString::fromAscii used the codec set - // by QTextCode::setCodecForCStrings. - // This makes the conversion consistent between Qt4 and Qt5. - QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); +#if (QT_VERSION < QT_VERSION_CHECK(5, 2, 0)) + #error this version of Qt is not supported. #endif QApplication *app; diff --git a/gui/upgrade.cc b/gui/upgrade.cc index 93d26695a..fa5cef402 100644 --- a/gui/upgrade.cc +++ b/gui/upgrade.cc @@ -304,11 +304,7 @@ void UpgradeCheck::httpRequestFinished(QNetworkReply* reply) QUrl downloadUrl; updateStatus_ = updateCurrent; // Current until proven guilty. -#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) - for (int i = 0; i < (int) upgrades.length(); i++) { -#else for (int i = 0; i < upgrades.length(); i++) { -#endif QDomNode upgradeNode = upgrades.item(i); QDomElement upgrade = upgradeNode.toElement(); diff --git a/main.cc b/main.cc index 32e1bd444..b5a1bdb0e 100644 --- a/main.cc +++ b/main.cc @@ -252,13 +252,8 @@ main(int argc, char* argv[]) (void) new gpsbabel::UsAsciiCodec(); /* make sure a US-ASCII codec is available */ -#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) - // Qt 5.0 uses QString::fromUtf8 to convert from character pointers - // and QBytreArrays to QStrings while previous version of Qt used - // QString::fromAscii. QString::fromAscii used the codec set - // by QTextCode::setCodecForCStrings. - // This makes the converstion consistent between Qt4 and Qt5. - QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); +#if (QT_VERSION < QT_VERSION_CHECK(5, 2, 0)) + #error This version of Qt is not supported. #endif // The first invocation of QTextCodec::codecForLocale() may result in LC_ALL being set to the native environment